using NodeCanvas.BehaviourTrees;
using NodeCanvas.Framework;
using UnityEngine;
namespace Yoozoo.Gameplay.Liberty.AI.Node
{
    public class ReturnFailure : BTDecorator
    {

        protected override Status OnExecute(Component agent, IBlackboard blackboard)
        {
            if ( decoratedConnection == null ) {
                return Status.Failure;
            }
            
            status = decoratedConnection.Execute(agent, blackboard);
            switch ( status ) {
                case Status.Running:
                    return Status.Running;

                default:
                    return Status.Failure;
            }
        }

    }
}